package com.tygz.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.auto.base.pojo.SysRights;
import com.auto.base.pojo.SysUser;
import com.auto.base.service.SysRightsService;
import com.tygz.service.SysRightsExtService;



@Transactional
@Service
public class SysRightsExtServiceImpl implements SysRightsExtService {
	
	private final Logger log = LoggerFactory.getLogger(SysRightsExtServiceImpl.class);
	@Resource
    public  SysRightsService service;
	
	@Override
	public void updateBetch(String pks, List<SysRights> list,SysUser sysUser) throws Exception {
		if(!StringUtils.isEmpty(pks)){
			this.service.dropSysRights(pks);
		}
		this.service.insertBeatch(list, sysUser);
	}

}
